<?php
namespace Model;
use Kuyuan\WqCore\Model\Model;

/**
 * 全局系统配置
 * Class SystemModel
 * @package Model
 */
class SystemModel extends Model
{
    protected $_fields = array(
        "kuyuan_defend",
        "notice",
        "notice_show",
        "install_time"
    );

    // ---get----
    public function getNoticeAttr($_value)
    {
        if($_value) {
            return htmlspecialchars_decode($_value);
        }
    }

    /**
     * 安装模块当日0点的时间戳
     * @param $_value
     * @return false|int
     */
    public function getInstallTimeAttr($_value)
    {
        if($_value) {
            return strtotime(date("Y-m-d",$_value));
        }
    }
}